#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n = 0;
	while (scanf("%d", &n) != EOF)
	{
		int count = 0;
		while (n)
		{
			n = n & (n - 1);
			count++;
		}
		if (count == 1||n==1)
			printf("YES");
		else
			printf("NO");
	}
	return 0;
}